﻿using Core.Entities;
using System;
using System.Collections.Generic;
using System.Text;

namespace Core.IPepositories
{
    public interface IUserRepository : IEntityRepository<User>
    {
        /// <summary>
        /// 检查用户是存在
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="password">密码</param>
        /// <returns>存在返回用户实体，否则返回NULL</returns>
        User CheckUser(string userName, string password);

        /// <summary>
        /// 根据ID得到用户的所有角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        User GetWithRoles(Guid id);
        User GetUserInfo(Guid userID);
        List<User> GetAllUser();
    }
}
